<%-- 
    Document   : rezervacija
    Created on : Dec 8, 2009, 11:54:21 PM
    Author     : Milan Boricic <boricic@gmail.com>
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>

<link rel="stylesheet" href="./css/ui-lightness/jquery-ui-1.7.2.custom.css"/>
<link rel="stylesheet" href="./css/jquery.clockpick.css"/>
<script type="text/javascript" src="./js/jquery.js"></script>
<script type="text/javascript" src="./js/jquery-ui.js"></script>
<script type="text/javascript" src="./js/jquery.clockpick.js"></script>




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">



    <html>
        <head>
            <script type="text/javascript">
                    $(function() {
                            
                            $("input:text[id*=datum]").datepicker({
                                dateFormat: 'dd.mm.yy.'
                            });
                            $("input:text[id*=pocevOd]").clockpick({
                                starthour : 8,
                                endhour : 22,
                                showminutes : false,
                                military : true
                            });
                    });

            </script>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Rezervacija</title>
        </head>
        <body>
            <h:form id="rezervacija">
                <h:messages/>
                <h:panelGrid columns="2">
                    <f:facet name="header">
                        <h:outputText value="Registracija"/>
                    </f:facet>

                    <h:outputLabel for = "datum"
                                   value = "Datum" />
                    <h:inputText id="datum"
                                 value="#{korisnik.termin.rezervacija.datumString}"/>
                    
                    
                    <h:outputLabel for = "pocevOd"
                                   value = "Početak" />
                    <h:inputText id="pocevOd"
                                 value="#{korisnik.termin.rezervacija.pocevOdString}"/>
                    
                    <h:outputLabel for = "trajanje"
                                   value = "Trajanje" />
                    <h:inputText id="trajanje"
                                 value="#{korisnik.termin.rezervacija.trajanje}"/>
                    
                    <h:outputLabel for = "namena"
                                   value = "Namena" />
                    <h:inputText id="namena"
                                 value="#{korisnik.termin.rezervacija.namena}"/>

                    <f:facet name="footer">
                        <h:panelGroup style="display:block; text-align:center">
                            <h:commandButton value="Rezervisi" 
                                             action="#{korisnik.termin.rezervacija.rezervisi}">
                            </h:commandButton>
                        </h:panelGroup>
                    </f:facet>
                </h:panelGrid>
            </h:form>
        </body>
    </html>
